var lineBallsWrap = ["$sce",function ($sce) {
    return function(text) {
        var newArguments= Array.prototype.slice.call(arguments);
        var sliceSize = 5;
        if(newArguments.length>1){
            sliceSize = parseInt(newArguments[1]);
        }
        var ballArray = text.split(",");
        var prefix= "";
        var subfix = "";
        var str = "";
        var max = parseInt(ballArray.length/sliceSize);
        for(var i =0;i<max;i++){
            var start = i * sliceSize;
            var end = i * sliceSize +sliceSize+1;
            str +="<p>"+ ballArray.slice(start,end).join(",")+"</p>";
        }
        return $sce.trustAsHtml(str);;
    }
}];

export  default lineBallsWrap;